<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <p><%= message %>: <span id="code"></span></p>
    <script>
       var data =<%- JSON.stringify(message) %>
       console.log(data);
      var int = 2;
       var i = null;
       function countdown() {
         document.getElementById("code").innerHTML = int + "秒后页面跳转";
         int--;
         if (int < 0) {
           i = window.clearInterval(i); //结束
           // console.log(redirectLink, 'redirectLink');
           int = 2; //重新赋值
           location.href =  <%- JSON.stringify(redirectLink) %>;
         }
       }
       countdown();
       i = setInterval(countdown, 1000);
    </script>
  </body>
</html>
